package com.qyx.pmpucat.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.Fastjson2TypeHandler;
import com.qyx.pmpucat.entity.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 选项分类实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("t_option_category")
public class OptionCategory extends BaseEntity {

    /**
     * 选项列表
     */
    @Column(value = "options", typeHandler = Fastjson2TypeHandler.class)
    private List<Option> options;

    /**
     * 排序号
     */
    @Column("sort")
    private Integer sort;

    /**
     * 分类描述
     */
    @Column("description")
    private String description;

    /**
     * 选项内部类
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Option {

        /**
         * 选项ID
         */
        private Integer id;

        /**
         * 选项文本
         */
        private String label;

    }
} 